package com.example;


import com.example.enums.SexEnum;
import com.example.mapper.UserMapper;
import com.example.pojo.User;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

@SpringBootTest
public class MybatisplusEnumtest {

    @Resource
    private UserMapper userMapper;

    @Test
    void test01() {
        User user = new User();
        user.setName("admin");
        user.setAge(33);
        user.setSex(SexEnum.MALE); // 这个就是设置我们的性别 为男
        int insert = userMapper.insert(user);
        System.out.println(insert);
    }
}
